/*
 * SkipList.h
 *
 *  Created on: Jan 28, 2013
 *      Author: grebwerd
 */

#ifndef SKIPLIST_H_
#define SKIPLIST_H_
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include "Node.h"
class SkipList {
public:
	bool isTopLevel;
	bool isValueFound;
	int levelValueFound;
	static int operationsCounter;
	static void resetOperationsCounter();
	Node* head;
	SkipList();
	virtual ~SkipList();
	void displayListLevel(int level);
	bool isNewMaxLevel(int level);
	void updateMaxLevel(int newMaxLevel);
	Node* find(int value);
	void insertNode(int value);
	void deleteNode(int value);
	Node* getTopNodeLevel(int level, Node* nodePtr);
	int generateRandomLevel();
	Node* moveNodePtrDownALevel(Node*);
};

#endif /* SKIPLIST_H_ */
